﻿#ifndef FUZZYSEARCH_H__
#define FUZZYSEARCH_H__

#include <QWidget>
#include <QSqlTableModel>
#include <QTableView>
#include <QComboBox>
#include <QPushButton>

class FuzzySearch : public QWidget
{
    Q_OBJECT
public:
    explicit FuzzySearch(QWidget *parent = 0);
	~FuzzySearch();
	virtual bool eventFilter(QObject * obj, QEvent *event);

public: 
    QSqlTableModel* _model;
    QTableView* _view;
 
public slots: 
    void slotModelDataChanged(QModelIndex,QModelIndex);
    void slotFilterChanged(QString filter);

private:
	void saveFilters();

private:
	QComboBox* _filter;
	QPushButton* _search;
	QPushButton* _setting;
	QSet<QString> _set;
 
};
#endif // FUZZYSEARCH_H__
